<template>
  <view class="container" :style="{backgroundImage: `url(${staticImgs.bg})`}">
    <image :src="staticImgs.title" class="title" />
    <image :src="staticImgs.light" class="light" />
    <image :src="staticImgs.back" class="back-btn" @click="backHandle" />
    <image :src="staticImgs.start" class="start-btn" mode="widthFix" @click="startScl" />
  </view>
</template>

<script>
  import navigationBar from '@/components/navigationBar/navigationBar.vue'

  export default {
    components:{
      navigationBar
    },
    props: {
      sclInfo: {
        type: Object,
        default: () => {}
      }
    },
    data() {
      return {
        staticImgs: {
          bg: this.imgBaseURL + '/scl/introduce/animalforest/bg.png',
          title: this.imgBaseURL + '/scl/introduce/animalforest/title.png',
          light: this.imgBaseURL + '/scl/introduce/animalforest/light.png',
          back: this.imgBaseURL + '/scl/introduce/animalforest/back.png',
          start: this.imgBaseURL + '/scl/introduce/animalforest/start.png'
        }
      }
    },
    methods: {
      startScl(){
        this.$emit('startScl')
      },
      backHandle() {
        this.$emit('backHandle')
      }
    },
    mounted() {
      uni.setNavigationBarColor({
        frontColor: '#ffffff',
        backgroundColor: '#000000'
      })
    },
    beforeDestroy() {
      uni.setNavigationBarColor({
        frontColor: '#000000',
        backgroundColor: '#ffffff'
      })
    }
  }
</script>

<style lang="scss" scoped>
  @keyframes zoom {
    0% {
      transform: scale(1);
    }
    70% {
      transform: scale(2);
    }
    100% {
      transform: scale(1);
    }
  }
  .container {
    height: 1624rpx;
    background-position: center top;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    position: relative;
    overflow: hidden;
  }

  .title {
    position: absolute;
    top: 223rpx;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 650rpx;
    height: 163rpx;
  }

  .light {
    position: absolute;
    top: 490rpx;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 750rpx;
    height: 813rpx;
    animation: zoom 3s linear infinite;
  }

  .back-btn {
    position: absolute;
    left: -10rpx;
    width: 123rpx;
    height: 88rpx;
    top: 1362rpx;
  }

  .start-btn {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 110rpx;
    margin: 0 auto;
    width: 492rpx;
    height: 206rpx;
  }
</style>